package com.sky.mapper;

import com.sky.entity.SetmealDish;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author xmy
 * @version 1.0
 */
@Mapper
public interface SetmealDishMapper {
    /**
     *
     * @param dishIds
     * @return
     */
    List<Long> getSetmealIdsByDishIds(List<Long> dishIds);
    @Delete("delete from setmeal_dish where setmeal_id=#{id}")
    void delete(Long id);

    void insertBatch(List<SetmealDish> setmealDishList);

    @Select("select  dish_id from setmeal_dish where setmeal_id=#{id}")
    List<Long> getDishIds(Integer id);

    @Select("select * from setmeal_dish where setmeal_id = #{setmealId}")
    List<SetmealDish> getBySetmealId(Long setmealId);
}
